Script: --on windowEvent wdID,wdName,objNo,objName,objValue¬¬Global titleList, currentImportTitle¬global gWindowPositions¬Global selectedTitleNums¬¬---------------------¬-- This is window #19¬---------------------¬¬if objValue="Open" then ¬ ¬ set cursor to watch¬ ¬ -- Restore old window position¬ put OldWindowPosition(19) into windowRect¬ if windowRect = empty then centerWindow wdName¬ ¬ wsSet wdID, "Message", "Text", "The title, “" & currentImportTitle & "” is not in the ComicBase."¬ ¬ -- Set up the comic list, pop-up¬ put -1 * BinarySearch(titleList,currentImportTitle) into selectedTitleNum¬ put selectedTitleNum into selectedTitleNums¬ put line selectedTitleNum of titleList into theTitle¬ ¬ put Capitalize(char 1 of currentImportTitle) into firstChar¬ if firstChar >= "A" and firstChar <= "Z" then put CharToNum(firstChar) - 63 into alphaSelectPos¬ else put 1 into alphaSelectPos¬ wsSet wdID,"alphaStrip","Selection", (alphaSelectPos & ",1")¬ SetNewList titleList, alphaSelectPos, wdId, false¬ ¬ wsSet wdID,"0","Properties","Comictitles_Selection:" & (selectedTitleNums - (wsGet(wdId,0,xlistStartPos)) + 1) & return & "OK_Disabled:" & (theTitle = empty) & return¬ wsSet wdID,"typedTitle","text",(line selectedTitleNums of titleList)¬ wsSet wdID,"typedTitle","Selection","0,200"¬ ¬ if wsGet(wdID,"ComicTitles","SelectionText") ≠ empty then¬ put line 4 of fld "publisher" of cd selectedTitleNums of bg "Title" into thePubDate¬ wsSet wdID,"0","Properties","Choose_Disabled:False" & return & "Skip_DefaultItem:False" & return & "Choose_DefaultItem:True" & return & "DatesPublished_Text:" & thePubDate ¬ else¬ wsSet wdID,"Choose","Disabled", "True"¬ wsSet wdID,"Skip","DefaultItem", "True"¬ wsSet wdID,"Choose","DefaultItem", "False"¬ end if ¬ ¬ set cursor to arrow¬else if objValue="Close" then ¬ -- save the window position¬ put "19" & tab & wdName & tab & wsGet(wdID,"0","Rect") into line 19 of gWindowPositions¬ ¬end if¬¬--end windowEvent¬
Result: i3_TextOfSelection¬i3_Selection
ItemType: PUSH
Rect: 373,169,453,189
AutoSize: FALSE
Name: Skip
CancelItem: TRUE
AutoClose: TRUE
Balloon: Click here to ignore this unknown title’s information and skip on to the next title to be imported.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global theCreatedTitle, selectedTitleNum¬¬put 0 into selectedTitleNum¬put empty into theCreatedTitle¬--end mouseUp
ItemType: PUSH
Rect: 373,141,453,161
AutoSize: FALSE
Name: Choose
DefaultItem: TRUE
AutoClose: TRUE
Balloon: Choose a title from the list above and click here to add the unknown title’s information to the title you’ve chosen.¬¬This is useful if the file you are importing lists the title slightly differently than the ComicBase does.
ItemType: LIST
Rect: 10,104,361,249
TextFont: Geneva
TextSize: 10
Name: ComicTitles
DoubleClickItem: 2
Text:
Balloon: This is a list of all the titles in the ComicBase. Choose title from this list then click “Choose” to have the unknown title’s information added to the one you selected (for instance, the import file may list the title under a slightly different name).
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global titleList¬¬put wsGet(wdID,"ComicTitles","SelectionText") into theTitle¬¬wsSet wdID,"TypedTitle","Text",theTitle¬wsSet wdID,"TypedTitle","Selection","0,200"¬¬if theTitle ≠ empty then¬ put find(titleList, theTitle, "Line","Exact") into whereFound¬ put line 4 of fld "publisher" of cd whereFound of bg "Title" into thePubDate¬ wsSet "Unknown Title","0","Properties","Choose_Disabled:False" & return & "Skip_DefaultItem:False" & return & "Choose_DefaultItem:True" & return & "DatesPublished_Text:" & thePubDate & return¬else¬ put find(titleList, theTitle, "Line","Exact") into whereFound¬ put line 4 of fld "publisher" of cd whereFound of bg "Title" into thePubDate¬ wsSet "Unknown Title","0","Properties","Choose_Disabled:True" & return & "Skip_DefaultItem:True" & return & "Choose_DefaultItem:False" & return & "DatesPublished_Text:" & return¬end if ¬--end mouseUp¬
ItemType: TEXT
Rect: 10,41,449,67
TextFont: Geneva
TextSize: 10
Name:
WhiteColor: -8739,-8739,-8739
Text: Do you want to add it as a new title, choose a different title to store its information under, or skip over this title?
ItemType: PUSH
Rect: 373,104,454,124
AutoSize: FALSE
Name: New… N
Balloon: Click here (or type Command-N) to add this unknown title as a new title in the ComicBase.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬Global selectedTitle, selectedTitleNum¬Global theCreatedTitle, gNewName,gNewAbbreviation¬Global copyrightInfo, matureReaders, newPublisher¬Global currentImportTitle¬¬put empty into selectedTitle -- New Title¬put currentImportTitle into theCreatedTitle¬Get WindowScript("Comic Title","False", "True") -- Don't show Remove button¬if it ≠ empty then¬ wsSend "Unknown Title","0","Close"¬ set cursor to watch¬ lock screen¬ set lockmessages to true¬ put line 2 of it into gNewName¬ if oldName = empty then put gNewName into selectedTitle¬ put line 3 of it into newPublisher¬ if newPublisher = "Other…" then put line 4 of it into newPublisher¬ put line 5 of it into gNewAbbreviation¬ put line 6 of it into copyrightInfo¬ put line 7 of it into matureReaders¬ send SaveTitle to cd btn "SaveTitle" of cd 3¬ send openCard to this card -- To redraw screen & set color¬ end if¬--end mouseUp
ItemType: TEXT
Rect: 10,8,451,40
Name: Message
WhiteColor: -8739,-8739,-8739
Text: The title, “” is not in the ComicBase.
ItemType: LINE
Rect: 373,131,453,132
BlackColor: -26215,-26215,-26215
ItemType: TEXT
Rect: 10,85,45,97
TextFont: Geneva
TextSize: 9
Name: TypePrompt
WhiteColor: -8739,-8739,-8739
TextStyle: Bold
Text: Title:
ItemType: TEXT
Rect: 45,83,345,99
TextFont: Geneva
TextSize: 9
Name: TypedTitle
LockText: FALSE
KeyFilter: SendTextNoArrows
ItemType: PICT
Rect: 10,248,361,263
AutoSize: FALSE
Name: AlphaStrip
Grid: 27,1
Logic: Radio
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global titleList¬¬SetNewList titleList, objValue, wdID, true¬¬put wsGet(wdID,"ComicTitles","SelectionText") into theTitle¬¬put empty into pubDate¬if theTitle ≠ empty then¬ put find(titleList, theTitle, "Line","Exact") into whereFound¬ put line 4 of fld "publisher" of cd whereFound of bg "Title" into thePubDate¬end if¬wsSet "Unknown Title","DatesPublished", "Text", thePubDate¬--end mouseUp